import fs from 'fs'
import path from 'path'
export async function openFile(dir: string) {
    const dirPath = path.join(__dirname, dir)
    if(!fs.existsSync(dirPath)) {
        // 目录不存在
        const mkdir = fs.promises
        const res =  await mkdir.mkdir(dirPath,{ recursive: true })
        return res
    } else {
        return ''
    }
}
